package com.zzh.weixinsell.service;

import com.zzh.weixinsell.model.dto.CartDTO;
import com.zzh.weixinsell.model.pojo.ProductInfo;
import org.springframework.boot.autoconfigure.data.web.SpringDataWebProperties;

import java.util.List;

/**
 * Create by ${ZZH} on 2018/4/18
 */
public interface ProductService {

    ProductInfo findOne(String produceId);

    /*
     *查询所有在价商品列表
     */
    List<ProductInfo> findUpAll();

    List<ProductInfo> findAll(SpringDataWebProperties.Pageable pageable);

    int insertOne(String product_id, String product_name, Integer product_price,
                  Integer product_stock, String product_description, String product_icon,
                  Integer product_status, Integer category_type);

    //加库存
    void increaseStock(List<CartDTO> cartDTOList);

    //减库存
    void decreaseStock(List<CartDTO> cartDTOList);
}
